package com.ruoqing.core.vo.auth;

import com.ruoqing.core.dto.BaseResponse;
import com.ruoqing.redis.dto.UserAuthorityDto;
import lombok.Data;

/**
	* @author YaoXian
	* @title: AuthResponseVo
	* @projectName ruoxi-blog
	* @description: 若兮微服务 - 核心模块 - 用户鉴权Vo对象
	* @date 2020-12-15 14:41
	*/
@Data
public class AuthResponseVo extends BaseResponse {
		
		private String accessToken;
		
		private UserAuthorityDto userAuthorityDto;
		
		public static AuthResponseVo buildAuthResponseVo(String status,String msg,String accessToken,UserAuthorityDto userAuthorityDto){
				AuthResponseVo authResponseVo = new AuthResponseVo();
				authResponseVo.setStatus(status);
				authResponseVo.setMessage(msg);
				authResponseVo.setAccessToken(accessToken);
				authResponseVo.setUserAuthorityDto(userAuthorityDto);
				return authResponseVo;
		}
		
		public static AuthResponseVo buildAuthResponseVo(String status,String msg){
				AuthResponseVo authResponseVo = new AuthResponseVo();
				authResponseVo.setStatus(status);
				authResponseVo.setMessage(msg);
				return authResponseVo;
		}
		
		public static AuthResponseVo buildAuthResponseVo(String status,String msg,String accessToken){
				AuthResponseVo authResponseVo = new AuthResponseVo();
				authResponseVo.setStatus(status);
				authResponseVo.setMessage(msg);
				authResponseVo.setAccessToken(accessToken);
				return authResponseVo;
		}
}
